-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAPI generator new properties #807
OpenAPI generator new properties #807
Conversation
@altro3 do you plan to finish work on this PR soon? I'm planning a new 4.1.0 release and this would be a good place to upgrade OpenAPI. |
@melix hi! Yeah, I'll finish tomorrow |
@melix oh, the latest release 5.1.1 didn't include these changes :-(. I'm afraid we'll have to wait for the 5.2.0 release... |
f7b1379
to
13d1117
Compare
0352024
to
cdf4106
Compare
Should be doable now that 5.2.0 is out. |
@melix Yes, that's right, but I need to add a language selection. Now there is a generator for Kotlin. I'll try to do it this week |
03bacc3
to
0fda0db
Compare
This looks like a breaking change, right? There's now |
@melix Hi! I finished modification the plugin and now it supports all the properties of the latest version of Openapi. But I need help to correctly write a generator test in Kotlin. Now I keep getting an error and I don’t understand how to fix it |
@melix I just tried not to change the old structure and integrate support for the new generator with minimal changes |
Generator settings for Kotlin and Java may differ. Yes, at the moment they coincide in this place, but in general, no one guarantees that this will not change later. The generators themselves for Java and Kotlin are absolutely not related to each other. They have different settings and different classes |
Yes, by the way, how can this be a breaking change if nothing changes for the user and the settings through the plugin are done in the same way as before? |
Got it, but from what I see, openapi-generator has a breaking change. It would have been better to keep |
What do you suggest? Just add |
No you're right that it doesn't seem to break compatibility here since the mapping is done internally. I will checkout the branch locally and carefully review it, easier than GitHub. Note that we can bump the plugin version but it's always a bit annoying because we maintain several branches. |
@altro3 I have fixed the Kotlin tests setup. However it seems that the Kotlin generator generates incorrect Kotlin code: the server tests are failing with a compile error. It is also possible that we need to properly setup the dependencies for Kotlin sources, I'm not sure yet. |
@melix I checked the generator. The code is correct, apparently, the dependencies really need to be fixed. Then I'll look at it tomorrow and then I can update micronaut-openapi to the latest version myself |
Ok, I'm confused because compilation fails on this line: security = [
SecurityRequirement(name = "petstore_auth", scopes = {"write:pets", "read:pets"})
] with:
|
I'll check or fix it tomorrow. Maybe it's really bug |
I think problem is here - |
yeah that's why I'm confused, for me there's a bug in the generator |
Yeah, I agree. Will fix it tomorrow |
a59382f
to
6c9e0d3
Compare
@melix could you check what is wrong now? I fixed generator bug |
- moves tests to functional tests, since we want to make sure that the plugins can work _without_ the Kotlin plugin on classpath. The tests which involve external plugins must live in `functionalTests` - fixes missing integration with Kotlin plugin
7ef33d6
to
2dd278a
Compare
I'm trying this locally and noticed
But, the swagger.yml is there. It does have some problems like in this example, under components:schemas, an enum property:
Also, the root |
@lucjross-favor Hi! thanks for help. Yes, I saw this message in logs, but the problem is that this message has nothing to do with the generator. Those. This is a potential bug in micronaut-openapi (in the swagger file generator by code), but this has nothing to do with the bug with micronaut-openapi-generator - the code generator by swagger file. So I don't think that's the problem |
@melix could you help? |
I think the error is unrelated here. The test resources tests put high load on agents and sometimes it fails. Also 3rd party branches cannot publish build scans. |
@altro3 is it good from your side? |
@melix yes, yes |
Prepare for next micronaut-openapi release